package net.xuele.learn.leetcode;

import org.junit.Test;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @Author: yubo
 * @Date: 2019/8/8 13:39
 * @Description:
 */
public class One {
    public static void main(String[] args) {
//        Integer integer = Integer.valueOf("-91283472332");
        List<Integer> sizeTable = new ArrayList<Integer>();
        for (int i = 16; i < 512; i += 16) {
            sizeTable.add(i);
        }

        for (int i = 512; i > 0; i <<= 1) {
            sizeTable.add(i);
        }

        int[] SIZE_TABLE = new int[sizeTable.size()];
        for (int i = 0; i < SIZE_TABLE.length; i ++) {
            SIZE_TABLE[i] = sizeTable.get(i);
            System.out.println(SIZE_TABLE[i]);
        }
    }

    @Test
    public int[] twoSum(int[] nums, int target) {
        Arrays.sort(nums);
        int end = nums.length - 1;
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] >= target) {
                end = i - 1;
            }
        }

        for (int i = 0; i <= end; i++) {
            int a = nums[i];
            int b = target - a;
        }

        return null;
    }
}
